package dataanalysis;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

@RestController
@EnableAutoConfiguration
public class Example {
    @RequestMapping("/")
    String home() {
    	String str = "[{\"xm\":\"张三\",\"age\":28},{\"xm\":\"李四\",\"age\":20},{\"xm\":\"王五\",\"age\":20}]";
        JSONArray datas = JSON.parseArray(str);
        JSONObject jo = datas.getJSONObject(0);
        
    	return "Hello World!";
    }
    public static void main(String[] args) throws Exception {
        SpringApplication.run(Example.class, args);
    }
}